home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
packet
/
terminal
/
top_152
/
src152.exe
/
rar
/
TOPIO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-05-16
|
47KB
|
1,625 lines
{┌─────────────────────────────────────────────────────────────────────────┐}
{│ │}
{│ T. O. P. │}
{│ │}
{│ (T)he (O)ther (P)acket │}
{│ │}
{│ T O P I O . P A S │}
{│ │}
{│ │}
{│ │}
{│ Verschiedene Routinen zum Ansprechen des TNC │}
{└─────────────────────────────────────────────────────────────────────────┘}
(* Eine HOSTMODE-Zeile an den TNC senden
Format: SendTNC(KanalNummer,Art(0=Text,1=Kommando),String) *)
Procedure SendTNC (* Var Kanal : Byt; ,Art : Byte; Zeile : String) *);
var Laenge : char;
Channel : char;
V24Nr : Byte;
ch : Char;
Begin
if Pseudo then
begin
Channel := chr(Kanal);
Kanal := 0;
end else Channel := K[Kanal]^.TNCKanal;
V24Nr := V24(Kanal);
ClearV24Buffer;
FillChar(K[Kanal]^.Response,SizeOf(K[Kanal]^.Response),0);
if TNC[K[Kanal]^.TncNummer]^.TNC_im_Host then
begin
Laenge := chr(length(Zeile)-1);
Switch_TNC(K[Kanal]^.TncNummer);
IRQsLock;
WriteAux(V24Nr,Channel + chr(Art) + Laenge);
WriteAux(V24Nr,Zeile);
end;
End;
Procedure TNCs_Pollen;
Begin
if not TNC_Halt then
begin
inc(Poll);
if Poll > TNC[PollTNr]^.Kbis then
begin
inc(PollTNr);
if not TNC_used[PollTNr] then PollTNr := 1;
Poll := TNC[PollTNr]^.Kvon;
K[0]^.TncNummer := PollTNr;
Kanal_Pollen(0);
end;
if Poll > 0 then with K[Poll]^ do
begin
if C_Poll or Test or Ext_Poll or Kanal_benutz or not TNC_ReadOut then
begin
Kanal_Pollen(Poll);
end else
if not TNC[TncNummer]^.ExtHost then
begin
if Pause = PollRate then Kanal_Pollen(Poll);
inc(Pause);
if Pause > PollRate then Pause := 0;
end;
end;
end;
End;
Procedure Kanal_Pollen (* Kanal : Byte *);
Var i,i1 : Byte;
VC : Char;
Puffer : Word;
SFrame : Byte;
Begin
with K[Kanal]^ do
Begin
if (Kanal = 0) and TNC[TncNummer]^.ExtHost then
begin
Pseudo := true;
Ausgabe := false;
TxRxTNC(FF,1,'G');
if Idle and (Response > '') then
begin
Idle_TCount := Idle_Tout;
Idle_TMerk := TimerTick;
end;
for i := 1 to Ord(Response[0]) do
begin
VC := Chr(Byte(Ord(Response[i])-1));
for i1 := TNC[TncNummer]^.Kvon to TNC[TncNummer]^.Kbis do
if K[i1]^.TNCKanal = VC then K[i1]^.Ext_Poll := true;
end;
end;
Ext_Poll := false;
Get_Linkstatus(Kanal);
if Kanal = 0 then
begin
Puffer := FreiePuffer(Kanal);
for i1 := TNC[TncNummer]^.Kvon to TNC[TncNummer]^.Kbis do
K[i1]^.BufToLow := Puffer < maxTncBuf;
if (not K[show]^.BufExists or Test) and
(((show = 0) and (Unproto = TncNummer)) or
((show > 0) and (TncNummer = K[show]^.TncNummer))) then
StatusOut(show,6,4,Attrib[9],SFillStr(5,B1,'»'+int_str(Puffer)));
end;
if not TNC_ReadOut then
begin
While L_Status[1] + L_Status[2] > 0 do
begin
S_PAC(Kanal,CM,true,'G');
Get_Linkstatus(Kanal);
end;
end else
begin
TncNix := false;
Repeat
S_PAC(Kanal,CM,true,'G');
Until (not MonCode5 and _KeyPressed) or TncNix;
end;
if BufExists and (Kanal > 0) then
begin
if Test then SendTestBuffer(Kanal) else
begin
SFrame := L_Status[3];
While BufExists and not _KeyPressed and
((MaxFrame > SFrame) or
(TNC_Puffer and (FreiePuffer(Kanal) > minTncBuf))) do
begin
SendBuffer(Kanal);
inc(SFrame);
end;
end;
end;
if FileSend and not FileSendWait then
Begin
if not BufExists and TNC_Puffer and (TX_Bin <> 2) then
Repeat
Puffer := FreiePuffer(Kanal);
if (Puffer > minTncBuf) then if FileSend then Send_File(Kanal,true);
Until (Puffer <= minTncBuf) or _KeyPressed or not FileSend
else begin
SFrame := L_Status[3];
While FileSend and not _KeyPressed and
(Upload or (MaxFrame > SFrame) or WishBuf) do
begin
Send_File(Kanal,true);
inc(SFrame);
end;
end;
end;
if not TNC_ReadOut and (Kanal = maxLink) then TNC_ReadOut := true;
end; (* WITH ... *)
End;
Procedure Get_Linkstatus (* Kanal : Byte *);
Var Pstr : String[10];
Attr,
i,i1 : Byte;
Begin
with K[Kanal]^ do
begin
if Kanal = 0 then i1 := 2 else i1 := 6;
Ausgabe := false;
S_PAC(Kanal,CM,true,'L');
for i := 1 to i1 do L_Status[i] := Byte(str_int(ParmStr(i,B1,Response)));
if Kanal > 0 then
begin
Pstr := SFillStr(3,B1,int_str(L_Status[3])) + { Send_Frames }
SFillStr(2,B1,int_str(L_Status[4])) + { Schon gesendet Frames }
SFillStr(3,B1,int_str(L_Status[5])); { Tries }
StatusOut(Kanal,13,1,Attrib[9],PStr);
if TxBeepAck and FlagTxBeep and (L_Status[3] = 0) and (L_Status[4] = 0) then
begin
if Klingel then Beep(G^.TxPiepFreq,G^.TxPiepTime);
FlagTxBeep := false;
end;
if TxBeepAck and ((L_Status[3] > 0) or (L_Status[4] > 0)) then FlagTxBeep := true;
Attr := Attrib[13];
if L_Status[6] in [1,7..15] then Attr := Attrib[7];
StatusOut(Kanal,2,4,Attr,LinkStatus[L_Status[6]]);
C_Poll := L_Status[6] > 0;
end;
end;
End;
(* Tastatur solange abfragen, bis kein Zeichen mehr kommt *)
Procedure Check_Keyboard;
var SK : Sondertaste;
VC : char;
i : Byte;
Procedure Tasten;
begin
KeyCheck := true;
_ReadKey(SK,VC);
KeyCheck := false;
if not ScreenSTBY then
begin
polling := false;
PollTime := TimerTick + KeyDelay;
Key_Active(show,SK,VC);
end else Neu_Bild;
if ScreenInit > 0 then ScreenTimer := ScreenInit;
end;
Begin
if not ch_aus then
begin
for i := 1 to maxLink do with K[i]^ do
begin
if RunEscFlag then ReadRunEsc(i);
if CSelf = 10 then
begin
AutoZaehl := AutoToAnzJmp;
CSelf := 3;
end;
if CSelf in [3,9] then Autozeile_Holen(i);
end;
if G^.Makro then While G^.Makro do Tasten
else While _KeyPressed do Tasten;
end else
begin
ch_aus := false;
Key_Active(show,SK_out,VC_out);
end;
if not polling then if TimerTick > PollTime then polling := true;
End;
Procedure Rufz_TNC_init (* Kanal : Byte *);
Begin
if Kanal > 0 then with K[Kanal]^ do
begin
if Test or Mo.MonActive or (Kanal = ConvHilfsPort) then
S_PAC(Kanal,CM,true,'I' + B1 + PhantasieCall) else
if not (connected or Kanal_benutz) then
begin
S_PAC(Kanal,CM,true,'I' + B1 + OwnCall);
StatusOut(Kanal,4,1,Attrib[9],EFillStr(9,B1,OwnCall));
StatusOut(Kanal,2,2,Attrib[9],ConstStr(B1,19));
end;
end;
End;
Procedure MH_Check (* TNC_Nr : Byte; Zeile : Str128 *);
Var i,
AnzDig : Byte;
FrUI,
FrRej,
DirDig : Boolean;
Rufz : String[9];
LongDig : String[70];
Procedure MH_Update(TNC_Nr : Byte);
var Stelle : Byte;
found : Boolean;
i : Byte;
Begin
if (G^.QRG_Anz > 0) and (AnzDig = 0) then
begin
i := 0;
Repeat
inc(i);
found := (Rufz = G^.QRG[i].Call);
Until found or (i = G^.QRG_Anz);
if found then
begin
with TNC[TNC_Nr]^ do if QRG_Akt <> G^.QRG[i].QRG then
begin
QRG_Akt := G^.QRG[i].QRG;
Status2;
TicStr := ConstStr(B1,TL);
end;
end;
end;
Stelle := 0;
Repeat
inc(Stelle);
found := (RufZ = MH^[Stelle].Call) and (TNC_Nr = MH^[Stelle].TNr);
Until found or (Stelle = maxMH);
if not found then
begin
{ for i := maxMH-1 downto 1 do MH^[i+1] := MH^[i]; }
move(MH^[1],MH^[2],(maxMH-1) * SizeOf(MH_Typ));
Stelle := 1;
FillChar(MH^[Stelle],SizeOf(MH_Typ),0);
end;
with MH^[Stelle] do
begin
Call := RufZ;
Zeit := copy(Datum,4,8) + B1 + copy(Uhrzeit,1,5);
Link := LongDig;
Qrg := TNC[TNC_Nr]^.QRG_Akt;
TNr := TNC_Nr;
if FrRej then inc(Rej);
if FrUI then inc(UIs);
end;
if (TicAnz > 0) and (LongDig = '') then with TNC[TNC_Nr]^ do if Tic then
begin
i := pos(Rufz + B1,TicStr + B1);
if i > 0 then
begin
While TicStr[i] <> B1 do delete(TicStr,i,1);
delete(TicStr,i,1);
end else
begin
i := length(Rufz) + 1;
delete(TicStr,Byte(TL+1-i),i);
end;
TicStr := Rufz + B1 + TicStr;
i := TL;
While (i > 0) and (TicStr[i] <> B1) do
begin
TicStr[i] := B1;
dec(i);
end;
if show = 0 then TickerOut;
end;
End;
Begin
LongDig := '';
AnzDig := 0;
DirDig := false;
Zeile := RestStr(Zeile);
Rufz := CutStr(Zeile);
FrRej := pos(' ctl REJ',Zeile) > 0;
FrUI := pos(' ctl UI',Zeile) > 0;
i := pos(' ctl ',Zeile);
Zeile := copy(Zeile,1,i-1);
i := pos('*',Zeile);
if i > 0 then
begin
DirDig := true;
Zeile := copy(Zeile,1,i-1);
delete(Zeile,1,pos(' via ',Zeile)+4);
While pos(B1,Zeile) > 0 do
begin
LongDig := B1 + CutStr(Zeile) + LongDig;
Zeile := RestStr(Zeile);
inc(AnzDig);
end;
LongDig := CutStr(Zeile) + LongDig;
inc(AnzDig);
end;
MH_Update(TNC_Nr);
if DirDig then
begin
Rufz := CutStr(LongDig);
LongDig := '';
AnzDig := 0;
FrRej := false;
FrUI := false;
MH_Update(TNC_Nr);
end;
End;
Procedure Screen_aus (* Art : Byte *);
Var i : Byte;
Begin
if not ScreenSTBY then
Begin
if (show > 0) and not BackScroll(show) then
Begin
case Art of
1 : dec(ScreenTimer);
2 : ScreenTimer := 0;
end;
if ScreenTimer = 0 then
begin
Teil_Bild_Loesch(1,maxZ,0);
ScreenSTBY := true;
end;
End else if Art = 2 then Alarm;
End;
End;
Procedure Uhr_aus;
Var Zeit : String[8];
Zstr : String[5];
Tstr : String[5];
i : Byte;
Begin
Zeit := Uhrzeit;
if copy(Zeit,7,2) <> copy(ZeitMerk,7,2) then
begin
StatusOut(show,13,4,Attrib[10],Zeit);
if ScreenSTBY then ScreenFill;
if NowFenster and (Box_Time > 0) then
begin
BoxZaehl := Pred(BoxZaehl);
if BoxZaehl <= 0 then Neu_Bild;
end;
if HardCur then if not JumpRxScr then
begin
JumpRxZaehl := pred(JumpRxZaehl);
if JumpRxZaehl <= 0 then JumpRxScr := true;
end;
for i := 1 to maxLink do if K[i]^.CSelf = 4 then
begin
dec(K[i]^.AutoWait);
if K[i]^.AutoWait = 0 then K[i]^.CSelf := 3;
end;
if copy(Zeit,4,2) <> copy(ZeitMerk,4,2) then
Begin
inc(LaufZeit);
for i := 1 to TNC_Anzahl do with TNC[i]^ do if Bake then
begin
if (LaufZeit mod BTimer) = 0 then
begin
K[0]^.TncNummer := i;
S_PAC(0,CM,true,'C' + B1 + BPfad);
S_PAC(0,NU,true,BText);
end;
if show = 0 then Unproto_darstellen;
end;
for i := 1 to maxLink do with K[i]^do
begin
if CSelf = 1 then if AutoTime = copy(Zeit,1,5) then CSelf := 3;
if CSelf = 2 then
begin
inc(AutoZyCount);
if AutoZyCount >= AutoZyConst then CSelf := 3;
end;
if CSelf = 3 then AutoToAnz := AutoToMax;
if (CSelf in [5,6]) and (AutoToCount > 0) then
begin
dec(AutoToCount);
if AutoToCount = 0 then
begin
CSelf := 9;
if AutoToAnz > 0 then
begin
dec(AutoToAnz);
if AutoToAnz = 0 then CSelf := 10;
end;
end;
end;
if Hold and not (FileSend or Einstiegskanal or AusstiegsKanal)
and ((LaufZeit mod HoldTime) = 0) then
begin
S_PAC(i,NU,true,HoldStr);
if not HardCur then InfoOut(i,0,1,HoldStr);
end;
end;
Tstr := copy(RestStr(Datum),1,5);
Zstr := copy(Zeit,1,5);
for i := 1 to G^.MAK_Anz do
begin
if G^.MAK[i].Uhr = Zstr then
begin
if (G^.MAK[i].Tag = '') or (G^.MAK[i].Tag = Tstr) then
begin
MakroInit;
Makro_Aktivieren(G^.MAK[i].Name);
end;
end;
end;
if ScreenInit > 0 then Screen_aus(1);
end;
ZeitMerk := Zeit;
end;
End;
(* TNC-Nachricht abholen und auswerten. Nur nach einem SendTNC ansprechen !!! *)
Procedure GetTNC (* Kanal : Byte *);
var i,i1,i2,
iz,ix,
Attr,
TNC_Nr : Byte;
Flag : Boolean;
Datei : Text;
Bstr : String;
Dummy : String;
IdStr : String[5];
BinFrame : Boolean;
Procedure Port_Ident(Kanal : Byte; var Col : Byte);
var HfPort,i : Byte;
flag : Boolean;
Begin
with K[Kanal]^ do
begin
i := pos(DP,Response);
if i > 0 then
begin
HfPort := str_int(Response[i-1]);
delete(Response,i-1,2);
KillStartBlanks(Response);
i := 1;
flag := false;
Repeat
if (TNC[i]^.DRSI = TNC[K[Kanal]^.TncNummer]^.DRSI) and
(TNC[i]^.HF_Port = HfPort) then flag := true else inc(i);
Until flag or (i > TNC_Anzahl);
if flag then Col := i
else Col := 1;
IdStr := TNC[Col]^.Ident;
if length(IdStr) > 0 then IdStr := EFillStr(5,B1,IdStr)
else IdStr := '';
end else
begin
IdStr := Channel_Id(Kanal);
Col := TncNummer;
end;
end;
End;
Begin
if TNC[K[Kanal]^.TncNummer]^.TNC_im_Host then with K[Kanal]^ do
begin
TNC_Nr := V24(Kanal);
get_Response(Kanal);
If not (OverRun or SynchError) then
Case TNC_Code of
0 : Begin (* success, no info *)
Response := '';
Ausgabe := true;
TncNix := true;
End;
1 : Begin (* success with info (null-terminated) *)
if TNC[TncNummer]^.DRSI > 0 then Port_ident(Kanal,ix)
else IdStr := Channel_Id(Kanal);
if Ausgabe then
begin
if TNC_ReadOut then InfoOut(Kanal,0,1,IdStr + Response)
else M_aus(Attrib[28],IdStr + Response +^J);
end;
Ausgabe := true;
End;
2 : Begin (* failure with info (null-terminated) *)
if Ausgabe then InfoOut(Kanal,1,1,Channel_Id(Kanal) + Response);
Ausgabe := true;
End;
3 : Begin (* Link Status (null-terminated) *)
if TNC[TncNummer]^.DRSI > 0 then Port_ident(Kanal,ix)
else IdStr := Channel_Id(Kanal);
If pos(LSM[1],Response) > 0 then
Begin (* BUSY fm ... *)
delete(Response,1,12);
Response := BusyStr + Response;
_aus(Attrib[20],Kanal,Response + M1);
Kanal_benutz := false;
if AusstiegsKanal then
begin
S_PAC(GegenKanal,NU,true,M2 + Response + M1);
Send_Prompt(GegenKanal,FF);
RemConInit(Kanal);
end;
Auto_CON := false;
Rufz_TNC_init(Kanal);
SetzeFlags(Kanal);
End else
If pos(LSM[2],Response) > 0 then
Begin (* CONNECTED to ... *)
if not Rekonnekt then
begin
Rekonnekt := false;
Kanal_benutz := true;
L_ON(Kanal,Response,true,false);
Line_ON(Kanal);
end else InfoOut(Kanal,1,1,'Reconnect to ' + Call);
End else
If pos(LSM[3],Response) > 0 then
Begin (* LINK RESET fm ... *)
Response := RestStr(Response);
_aus(Attrib[20],Kanal,Star + Response + M1);
Kanal_benutz := true;
End else
If pos(LSM[4],Response) > 0 then
Begin (* LINK RESET to ... *)
Response := RestStr(Response);
_aus(Attrib[20],Kanal,Star + Response + M1);
Kanal_benutz := true;
End else
If pos(LSM[5],Response) > 0 then
Begin (* DISCONNECTED *)
Rekonnekt := false;
if Conv.Active then ConversQuit(Kanal);
L_Off(Kanal);
Rufz_TNC_init(Kanal);
if EinstiegsKanal then S_PAC(GegenKanal,CM,true,'D');
if AusstiegsKanal then
begin
if K[GegenKanal]^.RemConReady then
begin
S_PAC(GegenKanal,NU,false,M2 + ReconStr +
K[GegenKanal]^.OwnCall+M2);
Send_Prompt(GegenKanal,FF);
end;
RemConInit(Kanal);
end;
End else
If pos(LSM[6],Response) > 0 then
Begin (* LINK FAILURE with ... *)
if Conv.Active then ConversQuit(Kanal);
if EinstiegsKanal then S_PAC(GegenKanal,CM,true,'D');
if AusstiegsKanal then
begin
if Auto_Con then S_PAC(GegenKanal,NU,false,M2 + FailStr + Ziel_Call + M1) else
begin
if connected
then S_PAC(GegenKanal,NU,false,M1 + ReconStr + K[GegenKanal]^.OwnCall+M1)
else S_PAC(GegenKanal,NU,false,M2 + Star + Response + M1);
end;
Send_Prompt(GegenKanal,FF);
RemConInit(Kanal);
end;
L_Off(Kanal);
Rufz_TNC_init(Kanal);
End else
If pos(LSM[7],Response) > 0 then
Begin (* CONNECT REQUEST fm ... *)
if Klingel then Beep(600,70);
InfoOut(show,1,1,Star + IdStr + Response);
End else
If pos(LSM[8],Response) > 0 then
Begin (* FRAME REJECT fm ... *)
Response := RestStr(Response);
_aus(Attrib[20],Kanal,Star + Response + M1);
End else
If pos(LSM[9],Response) > 0 then
Begin (* FRAME REJECT to ... *)
Response := RestStr(Response);
_aus(Attrib[20],Kanal,Star + Response + M1);
End else
Begin (* Unbekannt *)
_aus(Attrib[20],Kanal,InfoZeile(106) + Response + M1);
End;
End;
4 : Begin (* Monitor header, no info (null-terminated) *)
if TNC[TncNummer]^.DRSI > 0 then
begin
Port_Ident(0,ix);
ColMon := ColMonBeg + ix * 3 - 2;
MH_Check(ix,Response);
end else
begin
ix := TncNummer;
ColMon := ColMonBeg + ix * 3 - 2;
IdStr := Channel_Id(0);
MH_Check(ix,Response);
end;
TNC_K := (pos(' - ',Response) > 0); (* K auf 2 gesetzt ? *)
if Mon_Anz > 0 then
begin
for i := 1 to maxLink do with K[i]^.Mo do
begin
if MonActive and MonDisAbr then
if (pos(MonStr[1]+B1,K[0]^.Response) > 0) or
(pos(MonStr[2]+B1,K[0]^.Response) > 0) then
begin
if (pos(' ctl DISC',K[0]^.Response) > 0) or
(pos(' ctl DM',K[0]^.Response) > 0) then
begin
_aus(Attrib[20],i,M1 + InfoZeile(65) + B1 +
RestStr(K[0]^.Response) + M1);
Cancel_Call_monitoren(i);
end;
end;
end;
end;
if Drucker then Write_Lpt(0,LptEsc[1]);
Bstr := FormMonFr(ix,IdStr,Response);
if (Time_stamp and not TNC_K) then Bstr := Bstr + B1 + '(' + Uhrzeit + ')';
if not RxLRet then Bstr := ^J + Bstr;
M_aus(Attrib[ColMon],Bstr + ^J);
if Drucker then Write_Lpt(0,LptEsc[2]);
End;
5 : Begin (* Monitor header with info (null-terminated) *)
if TNC[TncNummer]^.DRSI > 0 then
begin
Port_Ident(0,ix);
ColMon := ColMonBeg + ix * 3 - 2;
MH_Check(ix,Response);
end else
begin
ix := TncNummer;
ColMon := ColMonBeg + ix * 3 - 2;
IdStr := Channel_Id(0);
MH_Check(ix,Response);
end;
TNC_K := (pos(' - ',Response) > 0); (* K auf 2 gesetzt ? *)
G^.HeaderStr := Response;
if Drucker then Write_Lpt(0,LptEsc[1]);
Bstr := FormMonFr(ix,IdStr,Response);
if Time_stamp and not TNC_K then Bstr := Bstr + B1 + '(' + Uhrzeit + ')';
if not RxLRet then Bstr := ^J + Bstr;
M_aus(Attrib[ColMon],Bstr);
if Drucker then Write_Lpt(0,LptEsc[2]);
MonCode5 := true;
End;
6 : If MonCode5 then (* Monitor info (Byte count) *)
Begin
MonCode5 := false;
if RxComp then Response := DeCompress(Response);
if PacOut then M_aus(Attrib[ColMon],' (' + int_str(TNC_Count) + ')');
M_aus(Attrib[ColMon],^J);
inc(ColMon);
Mon_Header_Auswerten;
if Mon_Anz > 0 then
for i := 1 to maxLink do with K[i]^.Mo do
if MonActive and (MonNow[1] or MonNow[2]) then
begin
TNC_Info(i,MonAttr,K[0]^.Response);
if K[0]^.TNC_Count > 255
then TNC_Info(i,MonAttr,K[0]^.Response256);
end;
if Drucker then Write_Lpt(Kanal,LptEsc[3]);
BinFrame := false;
if NoBinMon then
begin
i := length(Response);
Repeat
if ord(Response[i]) in [0..5,15..25,27..31,155..224,226..254]
then BinFrame := true;
dec(i);
Until BinFrame or (i < 1);
if BinFrame then
begin
Response := '<BIN';
if PacOut then Response := Response + RSK +^J
else Response := Response + B1 +
int_str(TNC_Count) + RSK +^J;
end;
end;
M_aus(Attrib[ColMon],Response);
if not BinFrame and (TNC_Count > 255) then
M_aus(Attrib[ColMon],Response256);
if Drucker then Write_Lpt(0,LptEsc[4]);
End;
7 : Begin (* Connected info (Byte count) *)
TNC_Info(Kanal,Attrib[18],Response);
if TNC_Count > 255 then TNC_Info(Kanal,Attrib[18],Response256);
End;
end;
End;
End;
Procedure S_PAC (* Kanal,Art : Byte; All : Boolean; Zeile : String *);
Var i,l : Byte;
Procedure MakePaclenStr(Zeile : String);
Begin
with K[Kanal]^ do
Repeat
l := FF - length(SendZeile);
SendZeile := SendZeile + copy(Zeile,1,l);
delete(Zeile,1,l);
While length(SendZeile) >= PacLen do
begin
if not BufExists and (Kanal > 0) and (BufToLow or WishBuf or Test) then
begin
OpenBufferFile(Kanal);
SetzeFlags(Kanal);
end;
if BufExists then WriteBuffer(Kanal,copy(SendZeile,1,PacLen))
else TxRxTNC(Kanal,0,copy(SendZeile,1,PacLen));
delete(SendZeile,1,PacLen);
end;
Until Zeile = '';
End;
Begin
with K[Kanal]^ do
begin
if Art = CM then TxRxTNC(Kanal,CM,Zeile) else
if Art = NU then
begin
if Auto_CON then NodeConnect(Kanal,UpCaseStr(Zeile));
l := Ord(Zeile[0]);
if l > 0 then TxLRet := Zeile[l] = M1;
if EigFlag or FileFlag or RemFlag then
begin
if Drucker then Write_Lpt(Kanal,LptEsc[7]);
if EigFlag then if not RxLRet then _aus(Attrib[19],Kanal,M1);
_aus(Attrib[19],Kanal,Zeile);
if Drucker then Write_Lpt(Kanal,LptEsc[8]);
end;
if TxComp then
begin
Repeat
i := Ord(Zeile[0]);
if i > maxCompPac then i := maxCompPac;
MakePaclenStr(Compress(copy(Zeile,1,i)));
delete(Zeile,1,i);
Until Zeile = '';
end else MakePaclenStr(Zeile);
if All and (length(SendZeile) > 0) then
begin
if not BufExists and (Kanal > 0) and (BufToLow or WishBuf or Test) then
begin
OpenBufferFile(Kanal);
SetzeFlags(Kanal);
end;
if BufExists then WriteBuffer(Kanal,SendZeile)
else TxRxTNC(Kanal,0,SendZeile);
SendZeile := '';
end;
end;
end;
End;
Procedure TxRxTNC (* Kanal,Art : Byte; Zeile : String *);
Var Merk : Boolean;
Begin
Merk := Ausgabe;
Ausgabe := false;
if (Kanal = 0) and (TNC[K[0]^.TncNummer]^.DRSI > 0) and
(K[0]^.TncAkt <> K[0]^.TncNummer) then
begin
K[0]^.TncAkt := K[0]^.TncNummer;
SendTNC(Kanal,1,TNC[K[0]^.TncNummer]^.HF_PortStr);
GetTNC(Kanal);
end;
Ausgabe := Merk;
SendTNC(Kanal,Art,Zeile);
GetTNC(Kanal);
End;
(* Monitor-Status aller angeschlossenen TNCs feststellen und speichern,
danach alle Monitore abschalten. *)
Procedure Moni_Off (* Art : Byte *);
Var i : Byte;
Begin
if MoniStaAnz = 0 then
begin
for i := 1 to TNC_Anzahl do with TNC[i]^ do
begin
K[0]^.TncNummer := i;
Ausgabe := false;
S_PAC(0,CM,true,'M');
MoniStatus := K[0]^.Response;
end;
if (Mon_Anz = 0) or (Art = 1) then
for i := 1 to TNC_Anzahl do with TNC[i]^ do
begin
K[0]^.TncNummer := i;
S_PAC(0,CM,true,'MN');
end;
end;
inc(MoniStaAnz);
End;
(* Monitor-Status bei allen TNCs wieder herstellen *)
Procedure Moni_On;
Var i : Byte;
Begin
if MoniStaAnz > 0 then dec(MoniStaAnz);
if MoniStaAnz = 0 then
begin
for i := 1 to TNC_Anzahl do with TNC[i]^ do
begin
K[0]^.TncNummer := i;
S_PAC(0,CM,true,'M' + B1 + MoniStatus);
end;
end;
End;
Procedure Check_Mld (* Kanal : Byte; Zeile : Str80 *);
Var i : Byte;
Flag : Boolean;
Hstr : String[80];
Begin
with K[Kanal]^ do
begin
Zeile := UpCaseStr(Zeile);
MldOk := 0;
Flag := false;
i := 0;
Repeat
inc(i);
if (Zeile > '') and
((i in [1..3,6,7,24]) and (pos(Meldung[i],Zeile) > 0)) or
((i in [4,5,8,9,11..15]) and (pos(Meldung[i],Zeile) = 1)) or
((i in [10,16,17,19..23]) and (Meldung[i] = Zeile)) or
((i in [18]) and (pos(Meldung[i],Zeile) = 1) and Conv.Active) then
begin
MldOk := i;
Flag := true;
end;
Until Flag or (i >= maxMld);
if not Flag and (ExtMld > '') and (pos(ExtMld,Zeile) = 1) then
begin
Flag := true;
ExtMldFlag := true;
end;
if Flag and Conv.Active and not (MldOk in [6,18]) then Flag := false;
if Flag and RecCheck and (MldOk = 6) then
begin
While pos(B1,Zeile) > 0 do Zeile := RestStr(Zeile);
if pos(DP,Zeile) > 0 then Zeile := ParmStr(2,DP,Zeile);
Hstr := ACMerk;
KillEndBlanks(Hstr);
if pos(RSK + Zeile + B1,Hstr) = 0 then
begin
Flag := false;
MldOk := 0;
end;
end;
if not Flag then MldOk := 0;
end;
End;
Procedure TNC_Info (* Kanal,Attr : Byte; Zeile : String *);
Var i : Byte;
Begin
with K[Kanal]^ do
begin
if not RxComp and KillEsc and (Mo.MonActive or SCon[11]) then
begin
While pos(E7m,Zeile) > 0 do delete(Zeile,pos(E7m,Zeile),4);
While pos(E0m,Zeile) > 0 do delete(Zeile,pos(E0m,Zeile),4);
end;
While Zeile > '' do
begin
i := pos(M1,Zeile);
if i > 0 then
begin
inc(RxLines);
MeldeZeile := MeldeZeile + copy(Zeile,1,i-1);
Check_Mld(Kanal,MeldeZeile);
if RxComp then
begin
if MldOk in [1,6,22] then
begin
RxComp := false;
TxComp := false;
CompZeile := '';
MeldeCompZ := '';
end else
if MldOk = 23 then
begin
CompZeile := '';
MeldeCompZ := '';
MldOk := 0;
delete(Zeile,1,i);
end else MldOk := 0;
end;
Comp_Sammler(Kanal,Attr,i >= length(Zeile),copy(Zeile,1,i));
MldOk := 0;
MeldeZeile := '';
AutoCheckLn := false;
delete(Zeile,1,i);
end else
begin
MeldeZeile := MeldeZeile + Zeile;
Comp_Sammler(Kanal,Attr,true,Zeile);
Zeile := '';
end;
end;
end;
End;
Procedure Comp_Sammler (* Kanal,Attr : Byte; FrEnd : Boolean; Zeile : String *);
Var i,i1,
i2,l : Byte;
CZeile : String;
Begin
with K[Kanal]^ do if RxComp then
begin
Repeat
i := FF - length(CompZeile);
i1 := length(Zeile);
if i > i1 then i := i1;
CompZeile := CompZeile + copy(Zeile,1,i);
delete(Zeile,1,i);
i := length(CompZeile);
if i > 0 then
begin
i1 := Ord(CompZeile[1]);
if i1 = FF then
begin
if i > 1 then i1 := Ord(CompZeile[2]);
if i1 = FF then i1 := FF-2;
dec(i);
l := 2;
end else l := 1;
if i > i1 then
begin
CZeile := DeCompress(copy(CompZeile,1,i1+l));
While CZeile > '' do
begin
i2 := pos(M1,CZeile);
if i2 > 0 then
begin
MeldeCompZ := MeldeCompZ + copy(CZeile,1,i2-1);
Check_Mld(Kanal,MeldeCompZ);
Connect_Info(Kanal,Attr,i2 >= length(CZeile),copy(CZeile,1,i2));
MldOk := 0;
MeldeCompZ := '';
AutoCheckLn := false;
delete(CZeile,1,i2);
end else
begin
MeldeCompZ := MeldeCompZ + CZeile;
Connect_Info(Kanal,Attr,true,CZeile);
CZeile := '';
end;
end;
delete(CompZeile,1,i1+l);
end;
end else i1 := FF;
Until (Zeile = '') and (i <= i1);
end else Connect_Info(Kanal,Attr,FrEnd,Zeile);
End;
Procedure Connect_Info (* Kanal,Attr : Byte; FrEnd : Boolean; Zeile : String *);
var i,i1,iz : Integer;
Flag,
BFlag,
ReKon : Boolean;
Bstr : String;
Rufz : String[9];
MemZeile : String[80];
Begin
with K[Kanal]^ do
begin
if ScreenSTBY then Neu_Bild;
ScreenTimer := ScreenInit;
Flag := true;
if not Ignore then Flag := false;
if RX_Save and (RX_Bin in [2,5]) and (MldOk in [6,10]) then Flag := false;
if AusstiegsKanal and (MldOk = 6) then Flag := false;
if Flag then MldOk := 0;
BFlag := true;
if RxComp then MemZeile := MeldeCompZ
else MemZeile := MeldeZeile;
ReKon := false;
if not Ignore and WishBoxLst and (SysArt in SysMenge) and
(Zeile[length(Zeile)] = M1) then
begin
BoxStr := MemZeile;
Write_BoxStr(Kanal,0);
end;
if EinstiegsKanal and not Ignore and not RemConReady then
begin
i := GegenKanal;
RemConInit(i);
S_PAC(i,CM,true,'D');
S_PAC(i,CM,true,'G');
Ausgabe := false;
S_PAC(i,CM,true,'D');
S_PAC(i,CM,true,'G');
if length(MemZeile) = 0 then
begin
MldOk := 0;
Send_Prompt(Kanal,FF);
end;
end;
if AusstiegsKanal and (MldOk = 6) then
begin
Zeile := '';
S_PAC(Kanal,CM,true,'D');
end;
if RX_Save then
begin
if not BinOut then BFlag := false;
if (RX_Bin = 5) and (MldOk in [6,10]) then
begin
Write_RxFile(Kanal,MemZeile);
BFlag := true;
end else
begin
if RX_Bin = 1 then BFlag := true;
Write_RxFile(Kanal,Zeile);
end;
end else
if AutoBinOn and (MldOk = 8) then
begin
OpenBinFile(Kanal,MemZeile);
end else
begin
if (RX_Bin in [3,4]) and (MldOk in [6,10]) then
begin
RX_Bin := 0;
S_Aus(Kanal,3,M1 + Star + InfoZeile(41) + M1);
S_PAC(Kanal,NU,true,'');
SetzeFlags(Kanal);
end;
end;
if SPlus and (RX_Bin = 0) then
begin
if (MldOk = 11) and (length(MemZeile) <> 69) then MldOk := 0;
if SplSave and (MldOk in [1,6,10,11,14]) then Close_7Plus(Kanal);
if SplSave then
begin
Write_SplFile(Kanal,Zeile);
if not BinOut then BFlag := false;
end;
if (MldOk in [11,14]) and not SplSave then
begin
Open_Close_7Plus(Kanal,MemZeile);
if SplSave then
begin
Write_SplFile(Kanal,MemZeile + M1);
if not BinOut then BFlag := true;
end;
end;
if SplSave and (MldOk in [12,15]) then
begin
Open_Close_7Plus(Kanal,MemZeile);
if not BinOut then
begin
Zeile := MemZeile + M1;
BFlag := true;
end;
end;
end;
if Drucker then Write_Lpt(Kanal,LptEsc[5]);
if BFlag then _aus(Attr,Kanal,Zeile);
if WeFlag then
begin
WeFlag := false;
_aus(Attrib[20],Kanal,G^.DZeile);
end;
if WishDXC and (MldOk = 4) and (Mo.MonActive or SCon[11]) then
begin
Bstr := MemZeile;
Compute_QTH(Bstr);
if Bstr > '' then _aus(Attrib[29],Kanal,Bstr + M1);
end;
if Drucker then Write_Lpt(Kanal,LptEsc[6]);
if CSelf > 0 then
begin
if (CSelf = 5) and (Auto1Zeile > '') and not AutoCheckLn and
(pos(Auto1Zeile,UpCaseStr(MemZeile)) > 0) then
begin
AutoCheckLn := true;
if AutoArt = 1 then
begin
Auto1Zeile := '';
AutoArt := 2;
end else CSelf := 8;
end;
if (CSelf = 5) and not AutoCheckLn and
(pos(AutoZeile,UpCaseStr(MemZeile)) > 0) then
begin
CSelf := 7;
AutoCheckLn := true;
end;
if (CSelf = 5) and (AutoToCount > 0) then AutoToCount := AutoToConst;
if CSelf = 8 then
begin
Auto1Zeile := '';
AutoJmpRet[AutoJmpPtr] := AutoZaehl;
inc(AutoJmpPtr);
if AutoJmpPtr > maxAutoJmpPtr then AutoJmpPtr := 1;
AutoZaehl := AutoJump;
CSelf := 7;
end;
if CSelf = 7 then Autozeile_Holen(Kanal);
end;
if not Ausstiegskanal then
begin
if SCon[1] then
begin
if (RxLines < 10) and (MldOk = 24) then DieBox_PW_Scan(Kanal,MemZeile);
end else
if SCon[2] then
begin
if ExtMldFlag then
begin
if RxLines <= 5 then
begin
BayBox_US_Scan(Kanal,Zeile);
ExtMld := '';
ExtMldFlag := false;
end else
begin
ExtMld := '';
ExtMldFlag := false;
end;
end;
end;
end;
if RTF and (MldOk = 5) then ComputeRTF(Kanal,MemZeile);
if (Kanal <> show) and
not(EinstiegsKanal or AusstiegsKanal or NochNichtGelesen) and
(not Conv.Active or (Conv.Active and (Kanal = ConvHilfsPort))) then
begin (* Signalisieren, dass neuer Text gekommen ist *)
NochNichtGelesen := true;
Status2;
If Klingel and TNC_ReadOut and
(not Mo.MonActive or (Mo.MonActive and Mo.MonSignal)) then Daten_Bell;
end;
if Conv.Active then
begin
if MldOk = 6 then ConversQuit(Kanal);
if MldOk = 18 then
begin
if not FrEnd then ConversTX(Kanal,true,false,'');
ConversRemote(Kanal,MemZeile);
end else if Zeile <> M1 then
begin
ConversTX(Kanal,FrEnd,false,Zeile);
inc(Conv.Count);
end;
if FrEnd then Conv.Count := 0;
end;
if AusstiegsKanal and Auto_CON and (MldOk in [1,2,3,6]) then
begin
S_PAC(GegenKanal,NU,false,M2 + FailStr + Ziel_Call + M1);
Send_Prompt(GegenKanal,FF);
S_PAC(Kanal,CM,true,'D');
RemConInit(Kanal);
end;
if not (AusstiegsKanal or EinstiegsKanal) then
begin
if FileSend and (TX_Bin <> 2) and (MldOk in [6,10]) then
begin
FiResult := CloseBin(TxFile);
FileSend := false;
if MldOk = 10 then
begin
S_Aus(Kanal,3,M1 + Star + InfoZeile(107) + M1);
S_PAC(Kanal,NU,true,'');
end;
SetzeFlags(Kanal);
end;
ReKon := false;
if not Ignore and not Mo.MonActive then
begin
if MldOk = 6 then
begin
NodeCmd := true;
ReKon := true;
end;
end;
if Auto_CON and (MldOk in [1,2,3,6]) then
begin
Auto_CON := false;
InfoOut(show,1,1,InfoZeile(119) + B1 + int_str(Kanal) + DP + B1 + InfoZeile(154));
end;
end;
if ((NodeCmd and not Ignore) or Auto_CON) and (MldOk in [6,7]) then
begin
if Rekon and (LogArt = 2) then LogBuchEintrag(Kanal,0);
MemZeile := UpCaseStr(MemZeile);
KillEndBlanks(MemZeile);
NodeCmd := false;
NodeCon := true;
While pos(B1,MemZeile) > 0 do MemZeile := RestStr(MemZeile);
if pos(DP,MemZeile) > 0 then MemZeile := ParmStr(2,DP,MemZeile);
Flag := Auto_CON;
L_ON(Kanal,TncConStr + B1+ MemZeile,false,Rekon);
Bstr := MemZeile;
if (morsen or Speek) and not Flag then
begin
Rufz := Bstr;
Strip(Bstr);
if morsen and ((ReKon and ReconMorsen) or (not ReKon and ConMorsen)) then
begin
Verzoegern(10 * MPause);
Morse(Kanal,Bstr);
end;
if Speek and ((ReKon and ReconVoice) or (not ReKon and ConVoice))
then Sprechen(Rufz);
ReKon := false;
end;
if AusstiegsKanal and not K[GegenKanal]^.RemConReady
and not Auto_CON then K[GegenKanal]^.RemConReady := true;
end;
if not Ignore then
begin
if SysopParm then Password_Auswert(Kanal,Zeile);
if Priv_Modus then (* //priv wurde bereits empfangen. Jetzt die *)
begin (* Antwort auswerten *)
Priv_Modus := false;
if pos(Priv_Errechnet,copy(Zeile,1,80)) > 0 then RemAll := true;
SetzeFlags(Kanal);
end;
end;
if Kopieren > 0 then S_PAC(Kopieren,NU,FrEnd,Zeile);
if EinstiegsKanal or (AusstiegsKanal and not FoundCall) then
begin
K[GegenKanal]^.WishBuf := true;
S_PAC(GegenKanal,NU,FrEnd,Zeile);
end;
if SCon[0] and (MldOk = 13) and (length(MemZeile) > 2) and TNC_ReadOut
and not (Ignore or Mo.MonActive or Conv.Active or SplSave) then
begin
Flag := Call_Exist(Kanal,2,'');
if Auto and not Flag then
begin
if FileSend then FertigSenden(Kanal);
RemFlag := Echo in [4..7];
if RemAll then i1 := 2
else i1 := 1;
delete(MemZeile,1,2);
KillEndBlanks(MemZeile);
if (length(MemZeile) = 0) then unknown := true else
begin
i := REM_Auswert(Kanal,i1,MemZeile);
if (Einstiegskanal and (i = 1)) or not Einstiegskanal
then Remote(Kanal,i,MemZeile);
if unknown then
begin
val(CutStr(MemZeile),i,i1);
if (i1 = 0) and (i in [0..maxLink]) then
begin
unknown := false;
if i = 0 then SendToChannel(Kanal,0,1,maxLink,MemZeile)
else SendToChannel(Kanal,0,i,i,MemZeile);
end;
end;
end;
MemZeile := B1 + DpS + UpCaseStr(MemZeile);
if unknown then S_PAC(Kanal,NU,false,InfoZeile(112) + MemZeile + M1);
if notRC then
begin
S_PAC(Kanal,NU,false,InfoZeile(129) + MemZeile + M1);
_aus(Attrib[20],Kanal,InfoZeile(300) + M1);
end;
if ParmWrong then S_PAC(Kanal,NU,false,InfoZeile(174) + MemZeile + M1);
if unknown or notRC or ParmWrong then Send_Prompt(Kanal,FF);
unknown := false;
notRC := false;
ParmWrong := false;
RemFlag := false;
end else
begin
if not (EinstiegsKanal or AusstiegsKanal or FileSend)
then S_PAC(Kanal,NU,true,InfoZeile(120) + M1);
if Flag and Auto then _aus(Attrib[20],Kanal,InfoZeile(300) + M1);
end;
end;
if FileSend and (TX_Bin = 2) then
Begin
if MldOk in [6,10] then
begin
FiResult := CloseBin(TxFile);
FileSend := false;
SetzeFlags(Kanal);
if MldOk = 10 then S_PAC(Kanal,NU,true,M1 + InfoZeile(107) + M1);
end;
if MldOk = 9 then TX_Bin := 3; { #OK# }
End;
if MldOk in [19,20,21,22] then Compress_Ein_Aus(Kanal);
end;
End;
Function FreiePuffer (* Kanal : Byte) : Word *);
Begin
with K[Kanal]^ do
begin
Ausgabe := false;
TxRxTNC(Kanal,1,'@B');
FreiePuffer := Word(str_int(Response));
end;
End;
Function QuerCheck (* Zeile : String) : Word *);
Var i,l : Byte;
w : Word;
Begin
l := ord(Zeile[0]);
w := l;
for i := 1 to l do w := w + ord(Zeile[i]);
QuerCheck := w;
End;
Procedure Mon_Header_Auswerten;
Var i,i1,i2,
iz,iNr,
fNr : Byte;
FehlFrame,
IFr,UFr : Boolean;
Hstr : String[25];
Bstr : String[80];
Fstr : String[50];
Begin
if Mon_Anz > 0 then
begin
iNr := pos(IFrame,G^.HeaderStr);
IFr := iNr > 0;
if IFr then
begin
iNr := pos(IFrame,G^.HeaderStr) + 7;
iNr := str_int(G^.HeaderStr[iNr]);
end;
UFr := pos(UFrame,G^.HeaderStr) > 0;
Hstr := ParmStr(2,B1,G^.HeaderStr) + zu +
ParmStr(4,B1,G^.HeaderStr) + B1;
for i := 1 to maxLink do with K[i]^ do
begin
if Mo.MonActive then
begin
for i1 := 1 to 2 do Mo.MonNow[i1] := false;
if Mo.MonBeide then iz := 2 else iz := 1;
for i1 := 1 to iz do
begin
if pos(Mo.MonStr[i1]+B1,Hstr) > 0 then
begin
if Mo.MonFirst[i1] then Mo.MonFrameNr[i1] := iNr;
FehlFrame := Mo.MonIFr and IFr and Mo.MonStrict and
(iNr <> Mo.MonFrameNr[i1]) and
(QuerCheck(K[0]^.Response) <> Mo.MonCtrl[i1][iNr]);
if (Mo.MonUFr and UFr) or FehlFrame or
(Mo.MonIFr and IFr and
(not Mo.MonStrict or (iNr = Mo.MonFrameNr[i1]))) then
begin
Mo.MonCtrl[i1][iNr] := QuerCheck(K[0]^.Response);
if FehlFrame then
begin
fNr := Mo.MonFrameNr[i1];
Mo.MonFrameNr[i1] := iNr;
Fstr := B1 + InfoZeile(170);
While fNr <> iNr do
begin
Fstr := Fstr + B1 + 'I' + int_str(fNr);
inc(fNr);
if fNr > 7 then fNr := 0;
end;
end;
inc(Mo.MonFrameNr[i1]);
if Mo.MonFrameNr[i1] > 7 then Mo.MonFrameNr[i1] := 0;
if (Hstr <> Mo.MonLast) or FehlFrame then
begin
if not RxLRet then _aus(Mo.MonAttr,i,M1);
if Mo.MonHCall then
begin
Bstr := Hstr;
KillEndBlanks(Bstr);
if not Mo.MonEHCall then Bstr := CutStr(Bstr);
Bstr := LSK + Bstr + RSK + DP;
if IFr then Bstr := Bstr + B1 + LRK + 'I' + int_str(iNr) + RRK;
if FehlFrame then
begin
Bstr[1] := S_ch;
Bstr := Bstr + Fstr;
end;
_aus(Attrib[19],i,Bstr + M1);
end;
end;
Mo.MonAttr := Attrib[25+i1];
Mo.MonLast := Hstr;
Mo.MonNow[i1] := true;
end;
Mo.MonFirst[i1] := false;
end;
end;
end;
end;
end;
End;
Procedure TickerOut;
Var i,i1,Attr : Byte;
Begin
if TicAnz > 0 then
begin
i1 := 0;
for i := 1 to Tnc_Anzahl do with TNC[i]^ do if Tic then
begin
inc(i1);
Attr := Attrib[ColMonBeg + i * 3];
WriteRam(1,i1,Attr,1,int_str(i) + DP + B1 + TicStr);
end;
end;
End;
Function FormMonFr (* TNr : Byte; Hstr : Str5; Zeile : String) : String *);
Var i : Byte;
Begin
if ModMonFr then
begin
delete(Zeile,1,3);
i := pos(B1+'to'+B1,Zeile);
Zeile[i] := RSK;
delete(Zeile,i+1,3);
i := pos(B1+'via'+B1,Zeile);
if i > 0 then delete(Zeile,i,4);
i := pos(B1+'ctl'+B1,Zeile);
if i > 0 then delete(Zeile,i,4);
i := pos(B1+'pid'+B1,Zeile);
if i > 0 then delete(Zeile,i,4);
end;
if MonID = 1 then Zeile := Hstr + Zeile;
if MonID = 2 then Zeile := int_str(TNr) + DP + Zeile;
FormMonFr := Zeile;
End;